import React from 'react'
import { Redirect, Route, Switch } from 'react-router-dom'
import About from './pages/About'
import Home from './pages/Home'
import Header from './components/Header'

import INavLink from './components/INavLink'

import './App.css'

function App() {
  return (
    <>
      <div className='row'>
        <div className='col-xs-offset-2 col-sx-8'>
          <Header />
        </div>
      </div>
      <div className='row'>
        <div className='col-xs-2 col-xs-offset-2'>
          <div className='list-group'>
            <INavLink to='/about'>About</INavLink>
            <INavLink to='/home'>Home</INavLink>
          </div>
        </div>
        <div className='col-xs-6'>
          <div className='panel'>
            <div className='panel-body'>
              <Switch>
                <Route path='/about' component={About} />
                <Route path='/home' component={Home} />
             
                <Redirect to='/home'/>
              </Switch>
            </div>
          </div>
        </div>
      </div>
    </>
  )
}

export default App
